<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<htmlb:content design="design2003" >
  <htmlb:page title="Maintain Parameters for Bueinss Reporting" >

  <script>
    function checkEmpty()
    {
       var Check = document.getElementById('CONTEXT');
       if(Check.value == ''){
        alert('Enter record to delete');
        htmlbevent.cancelSubmit = true;
       }
    }
  </script>

    <htmlb:form id="perl" >
      <%
  if not message is initial .
      %>

     <htmlb:image id      = "erroimg"
                           tooltip = "<%= message %>"
                           src     = "<%= msg_icon %>" />
     <htmlb:textView id        = "mesg1"
                      text      = "<%= message %>"
                      design    = 'EMPHASIZED'
                      width     = "250" />

      <%
  clear message .
  endif .
      %>
      <xhtmlb:toolbar id="tb1" >
        <xhtmlb:toolbarItem>
          <htmlb:button id      = "CREA"
                        text    = "NEW ENTRIES"
                        onClick = "CREA"
                        design  = "small"
                        tooltip = 'Create New Entries'
                        width   = "50" />
          <htmlb:button id            = "DELE"
                        text          = "DELETE"
                        onClick       = "DELE"

                        design        = "small"
                        tooltip       = 'Delete Entries'
                        width         = "50" />
          <htmlb:button id            = "SAV"
                        text          = "SAVE"

                        onClick       = "SAVE"
                        design        = "small"
                        tooltip       = 'Save changes'
                        width         = "50" />
        </xhtmlb:toolbarItem>
      </xhtmlb:toolbar>
      <htmlb:tableView id                  = "PARAMS"
                       design              = "ALTERNATING"
                       headerVisible       = "true"
                       headerText          = "Maintain Business Reporting Parameter"
                       table               = "<%= ADMIN_PAR %>"
                       width               = "100%"
                       columnHeaderVisible = "true"
                       sort                = "SERVER"
                       columnDefinitions   = "<%= COL_CONTROL_TAB %>"
                       emptyTableText      = "No Parameter found"
                       keepSelectedRow     = "TRUE"
<%--                       keyColumn           = "USERID"--%>
                       onHeaderClick       = "headerClick"
                       visibleRowCount     = "20"
                       selectionMode       = "SINGLESELECT"
                       onRowSelection      = "DISP_DEF"
                       filter              = "SERVER" />
      <table>
      <%
  if action = 'CREA' .
      %>
      <tr><td>
      <htmlb:label for  = "CONTEXT"
                   text = "Parameter Context" />
      </td>
                         <td>
      <htmlb:inputField id        = "F_CONTEXT"
                        value     = "<%= wa_admin_par-context %>"
                        width     = "100"
                        maxlength = "30" />
      </td>
      </tr>
      <tr>

       <td>
      <htmlb:label for  = "NAME"
                   text = "Parameter Name" />
      </td><td>
      <htmlb:inputField id        = "F_NAME"
                        value     = "<%= wa_admin_par-name %>"
                        width     = "250"
                        maxlength = "250" />
      </td>
      </tr>
      <tr>

      <td>
      <htmlb:label for  = "VALUE"
                   text = "Parameter  Value" />
      </td><td>
      <htmlb:inputField id        = "F_VALUE"
                        value     = "<%= wa_admin_par-value %>"
                        width     = "250"
                        maxlength = "250" />
      </td>

      </tr>
      <%
  elseif action = 'ROSEL' .
      %>

      <tr><td>
      <htmlb:label for  = "L_CONTEXT"
                   text = "Parameter Context" />
      </td><td>
      <htmlb:inputField id        = "F_CONTEXT"
                        value     = "<%= wa_admin_par-context %>"
                        width     = "100"
                        disabled  = "true"
                        maxlength = "30" />
       </td></tr>
      <tr>

      <td>
      <htmlb:label for  = "L_NAME"
                   text = "Parameter Name" />
      </td><td>
      <htmlb:inputField id        = "F_NAME"
                        value     = "<%= wa_admin_par-name %>"
                        width     = "250"
                        maxlength = "250" />
      </td>
       </tr>
      <tr>
      <td>
      <htmlb:label for  = "L_VALUE"
                   text = "Parameter Value" />
      </td><td>
      <htmlb:inputField id        = "F_VALUE"
                        value     = "<%= wa_admin_par-value %>"
                        width     = "250"
                        maxlength = "250" />
      </td>

      </tr>
      <%
  endif .
      %>
      </table>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>